<template>
  <!--政策通告-->
  <div class="container">
    <div class="header">
      <loginHeader
        :isShowType="isShowType"
        :activeIndex="activeIndex"
      ></loginHeader>
    </div>
    <div class="main">
      <div class="bannerbox">
        <div class="banner">
          <img src="../../../static/img/common/policyBanner.png" />
        </div>
        <div class="banner-title">
          <img src="../../../static/img/common/policyAnnunciate.png" />
        </div>
      </div>
      <div class="content">
        <div>
          <div
            v-for="(item, index) in tableList"
            style="border-bottom: 1px #deeef9 solid"
            class="list"
            :key="index"
          >
            <a @click="toDetail(item, index)">
              <div
                style="
                  height: 64px;
                  line-height: 64px;
                  font-size: 16px;
                  color: #375f88;
                  position: relative;
                  padding-left: 36px;
                  cursor: pointer;
                "
              >
                【{{ item.infoTypeDesc }}】&nbsp;&nbsp;{{ item.title }}
                <div
                  style="
                    position: absolute;
                    right: 5px;
                    top: 0;
                    width: 120px;
                    height: 60px;
                    text-align: center;
                  "
                >
                  {{ item.createTime }}
                </div>
              </div>
            </a>
          </div>
          <Pagination
            ref="pagination"
            @getList="getTableList"
            @current-change="handleCurrentChange"
            :filterField="filterField"
            :requestUrl="requestUrl"
            style="margin-top: 30px"
          />
        </div>
      </div>
    </div>
    <!-- <div class="footer">
            主办单位:&nbsp;&nbsp;内蒙古自治区人力资源和社会保障厅&nbsp;&nbsp;&nbsp;&nbsp;合作单位:&nbsp;&nbsp;中国经济信息社&nbsp;&nbsp;&nbsp;&nbsp;技术支持:&nbsp;&nbsp;湖北会基网络科技有限公司
        </div> -->
    <loginFooter v-if="!isYS()"></loginFooter>
  </div>
</template>
<script>
import loginHeader from '@/components/publicCom/loginHeader'
import loginFooter from '@/components/publicCom/loginFooter'
export default {
  name: 'policyAnnunciate',
  components: {
    loginHeader,
    loginFooter,
  },
  data() {
    return {
      tableList: [],
      requestUrl: 'api-i/info/expand/listbypublic',
      isShowType: true,
      activeIndex: '1',
      date: [],
      //搜索条件
      filterField: {},
      isShow: false, //列表加载
      currentPage: 1,
    }
  },
  created() {
    this.$nextTick(function () {
      this.$refs.pagination.getTableListData()
    })
  },
  methods: {
    getTableList(data) {
      this.tableList = data
    },
    toDetail(item, index) {
      this.$router.push({
        path: '/common/policyAnnunciateDetail',
        name: 'policyAnnunciateDetail',
        query: {
          policy: item,
          index: index,
          currentPage: this.currentPage,
        },
      })
      this.$store.commit('CHANGE_SLIDER_NAME', {
        oldUrl: '/common/policyAnnunciate',
        newUrl: this.$router.currentRoute.fullPath,
      })
    },
    handleCurrentChange(val) {
      this.currentPage = val
    },
  },
}
</script>

<style scoped>
.header {
  width: 100%;
  position: absolute;
  top: 0;
  background: #0f4d9a;

  background: linear-gradient(
    left,
    #08205c 0%,
    #0f4d9a 10%,
    #0f4d9a 90%,
    #08205c 100%
  );
  height: 64px;
}
.bannerbox {
  width: 100%;
  position: relative;
  overflow: hidden;
  height: 348px;
}
.banner {
  width: 1920px; /*图片宽度*/
  position: absolute;
  left: 50%;
  margin-left: -960px; /*图片宽度的一半*/
}
.banner-title {
  width: 194px;
  position: absolute;
  left: 50%;
  margin-left: -97px;
  top: 50%;
  margin-top: -27px;
  z-index: 20;
}
.main {
  width: 100%;
  overflow: auto;
  top: 64px;
  position: absolute;
  z-index: 10;
  bottom: 66px;
}
.content {
  margin: 0 auto;
  width: 900px;
}

.container .footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 64px;
  line-height: 64px;
  background-color: #3e3e4a;
  text-align: center;
  color: #ffffff;
  margin-top: 50px;
  font-size: 14px;
  margin-bottom: 0;
}
/* 鼠标移入显示光标 */
.list {
  cursor: pointer;
}
</style>
